package monster.flight.admin.action.xtgl.user;



import monster.comm.action.BaseJsonAction;
import monster.comm.exception.InvalidParameterException;
import monster.comm.exception.UniqueNeedException;
import monster.comm.log.ILog;
import monster.comm.log.LogService;
import monster.comm.util.ReturnConstant;
import monster.flight.admin.manager.service.xtgl.UsersService;
import monster.flight.admin.vo.xtgl.Xt_usersVO;
import monster.flight.comm.entity.vo.Xt_users;

/**
 * 
 * 创建信息
 * ============= 类名: monster.flight.admin.action.xtgl.user.UserDelAction
 * 类作用描述: * 后台系统管理后台管理人员增删改查
 *  创建人：
 *   wanghong 创建时间： 2013-1-18 上午11:26:10 
 * 修改信息1=============
 * 修改类型: //1.修改bug 2.业务变化修改 修改描述: 修改人： 修改时间：
 */
public class UserDelAction extends BaseJsonAction {
	ILog log = LogService.getLog(UserDelAction.class);
	private Xt_users xt_users;
	private UsersService usersService;
    
	/**
	 * @Description: 删除管理人员
	 * 判断是否登录如果没有登录直接返回
	 * @return String
	 */
	public String delUser() {
		String isLogin = isLogin();
		if("1".equals(isLogin)){
				try {
					usersService.delete(xt_users.getUser_id());
					returnVO.returnCode = ReturnConstant.IS_DEAL_OK;
				}  catch (Exception e) {
					returnVO.returnCode = ReturnConstant.IS_ERR;
					returnVO.returnDesc = e.getMessage();
					log.error(e.getMessage(), e);
				}
				
		}else{
			returnVO.returnCode = ReturnConstant.IS_NOT_LOGIN;
		}	
		return SUCCESS;
	}
	public Xt_users getXt_users() {
		return xt_users;
	}
	public void setXt_users(Xt_users xt_users) {
		this.xt_users = xt_users;
	}
	
	public void setUsersService(UsersService usersService) {
		this.usersService = usersService;
	}
	

}
